Skip to content

Add a safe custom table gateway - #21

Merged
ephpicman merged 5 commits into
mainfrom
feature/custom-table-api
Nov 13, 2026
Merged

ephpicman merged 5 commits into
mainfrom
feature/custom-table-api

Conversation

@ephpicman

Copy link
Copy Markdown
Contributor

Summary

  • Add CustomTable for application-owned tables using the active WordPress $wpdb connection.
  • Support current-site and network-wide table prefixes.
  • Delegate insert, update, and delete to the native wpdb CRUD methods.
  • Add prepared query, execute, result, row, and scalar helpers.
  • Validate table suffixes and use WordPress placeholders, including %i identifiers.
  • Add WordPress Core integration coverage and usage documentation.

Scope

This is a small table gateway, not a SQL query builder or ORM. It does not manage schemas, migrations, relations, or database connections. Core entities continue to use their native APIs.

Dependency

This PR is stacked on #20 (which is stacked on #19). Merge in dependency order.

@ephpicman
ephpicman force-pushed the audit/core-data-api-review branch from 3aec65b to 8a56286 Compare November 13, 2026 02:03
@ephpicman
ephpicman force-pushed the feature/custom-table-api branch from 83e96f4 to b5f9c87 Compare November 13, 2026 02:03
@ephpicman
ephpicman force-pushed the feature/custom-table-api branch from b5f9c87 to cf04c54 Compare November 13, 2026 02:04
Base automatically changed from audit/core-data-api-review to main November 13, 2026 02:10
@ephpicman
ephpicman merged commit e754c9d into main Nov 13, 2026
16 checks passed
@ephpicman
ephpicman deleted the feature/custom-table-api branch November 13, 2026 02:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant